#ifndef _NVIC_H_
#define _NVIC_H_

struct nvic_reg {
    volatile unsigned int ISER[8]; /*!< Offset: 0x000  Interrupt Set Enable Register           */
    unsigned int          RESERVED0[24];
    volatile unsigned int ICER[8]; /*!< Offset: 0x080  Interrupt Clear Enable Register         */
    unsigned int          RSERVED1[24];
    volatile unsigned int ISPR[8]; /*!< Offset: 0x100  Interrupt Set Pending Register          */
    unsigned int          RESERVED2[24];
    volatile unsigned int ICPR[8]; /*!< Offset: 0x180  Interrupt Clear Pending Register        */
    unsigned int          RESERVED3[24];
    volatile unsigned int IABR[8]; /*!< Offset: 0x200  Interrupt Active bit Register           */
    unsigned int          RESERVED4[56];
    volatile unsigned int IP[240]; /*!< Offset: 0x300  Interrupt Priority Register (8Bit wide) */
    unsigned int          RESERVED5[644];
    volatile unsigned int STIR; /*!< Offset: 0xE00  Software Trigger Interrupt Register     */
};

extern volatile struct nvic_reg *nvic;

#endif
